using System;
using StateTheaterDataModel;

namespace StateTheater.Models
{
    public class CastItem
    {
        public NameDetails Person { get; set; }
        public string Role { get; set; }
        public int RoleID { get; set; }
        public RoleAward Award { get; set; }

        public override string ToString()
        {
            string award = (Award == null || Award.AwardID == Int32.MaxValue) ? "null" : String.Format("{0} {1} {2}", Award.Year, Award.PerryAwardsCategory.Award, Award.Win);
            return String.Format("{0} {1}({2}): {3} {4}", Person.FirstName, Person.LastName, Person.ID, Role, award);
        }
    }
}
